﻿using AJWPFAdmin.Core.CommonEntity;
using Masuit.Tools.Core.Validator;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AJWPFAdmin.Core.Models.EF.Tables
{
    /// <summary>
    /// 物资记录表
    /// </summary>
    [Comment("物资记录表")]
    public partial class Goods : CommonTableEntity
    {
        /// <summary>
        /// 物资名称
        /// </summary>
        [Comment("物资名称")]
        [Display(Name = "物资名称")]
        [Required(ErrorMessage = "{0}必填")]
        [MaxLength(120)]
        [StringLength(120, ErrorMessage = "{0}超长:{1}")]
        public string Name { get; set; }

        /// <summary>
        /// 默认重量,kg
        /// </summary>
        [Comment("默认重量(kg)")]
        [Display(Name = "默认重量")]
        [Precision(18, 2)]
        [MinValue(0, ErrorMessage = "{0}至少为1")]
        public decimal DefaultWeight { get; set; }

        /// <summary>
        /// 是否大宗货物
        /// </summary>
        [Comment("是否大宗货物")]
        [Display(Name = "是否大宗货物")]
        public bool IsBulkCargo { get; set; }

        /// <summary>
        /// 物资分类
        /// </summary>
        [Comment("物资分类")]
        [Display(Name = "物资分类")]
        [StringLength(100, ErrorMessage = "{0}超长:{1}")]
        public string Category { get; set; }

    }
}
